{% extends 'web_templates/public/base.html' %}
{% block title %}{{ g.sys.web_name }} - {{ g.sys.web_all_key }}{% endblock %}
{% block keywords %}{{ g.sys.web_key }}{% endblock %}
{% block description %}{{ g.sys.web_description }}{% endblock %}
{% block nav %}
    <li class="item common">
        <a href="{{ url_for('web_bp.tl_index') }}" title="{{ g.sys.web_name }}">首页</a>
    </li>
    {% for column in g.column|sort(attribute='column_order', reverse=false) %}
        <li class="item common">
            <a href="{% if column.column_link %}{{ column.column_link }}{% else %}{{ url_for('web_bp.list_article',uuid=column.uuid) }}{% endif %}">{{ column.column_name }}</a>
        </li>
    {% endfor %}
{% endblock %}
{% block content_left %}
    <div class="positionbar">
        <ul class="bread clearfix">
            <li class="ico"><img src="{{ url_for('static',filename='tl_cms/images/ico_07.png') }}"></li>
            <li><a href="{{ url_for('web_bp.tl_index') }}">首页</a></li>
            <li class="last">
                搜索 <b>{{ keyword }}</b> 的结果
            </li>
        </ul>
    </div>
    <!--articleList -->
    {% if g.col_doc %}
        <ul class="articleCon">
            {% for doc in g.col_doc %}
                <li class="clearfix">
                    {% if doc.thumb_img %}
                        <div class="thumb">
                            <a href="{{ url_for('web_bp.article_article',uuid=doc.uuid) }}" target="_blank">
                                <img src="{{ doc.thumb_img }}" title="{{ doc.title }}" width="200" height="131"> </a>
                        </div>
                    {% endif %}
                    <div class="mark {% if not doc.thumb_img %} no_img {% endif %}">
                        <h3><a href="{{ url_for('web_bp.article_article',uuid=doc.uuid) }}"
                               target="_blank" title="{{ doc.title }}">{{ doc.title[:22] }}</a></h3>
                        <p class="icogroup">
                    <span class="ico-list">
                        <span class="icon icon-01"></span>作者：
                        <a title="{{ doc.author }}">{{ doc.author }}</a></span><span class="ico-list">
                    <span class="icon icon-02"></span>日期：{{ doc.update_time }}</span>
                            <span class="ico-list"><span class="icon icon-03"></span>分类：
                        <a href="{{ url_for('web_bp.list_article',uuid=doc.pro.uuid) }}">{{ doc.pro.column_name }}</a></span>
                        </p>
                        <p class="info">
                            {{ doc.description[:100]|striptags }}{% if (doc.description|length)>100 %}...{% endif %}
                        </p>
                    </div>
                    <a href="{{ url_for('web_bp.article_article',uuid=doc.uuid) }}" class="more"
                       target="_blank">阅读全文</a>
                </li>
            {% endfor %}
            <!-- 11个 -->
        </ul>
    {% else %}
        <div class="articleCon">
            <div class="nolog">
                <h2>暂无内容</h2><br>
                <p>抱歉，没有符合您查询条件的结果。</p>
            </div>
            <div class="bk15"></div>
            <div class="pagination"></div>
        </div>
    {% endif %}
    {% if g.page.pages>1 %}
        <div class="bk15"></div>
        <div class="pagination">   <!--分页-->
            {% if g.page.has_prev %}
                <a href="{{ url_for('web_bp.list_article',uuid=g.col_first.uuid) }}?page={{ g.page.prev_num }}">上一页</a>
            {% endif %}
            {% for page in g.page.iter_pages(2,2,2,2) %}
                {% if g.page.page==page %}
                    <span>{{ page }}</span>
                {% elif page %}
                    <a href="{{ url_for('web_bp.list_article',uuid=g.col_first.uuid) }}?page={{ page }}">{{ page }}</a>
                {% endif %}
            {% endfor %}
            {% if not g.page.pages==g.page.page %}
                <a href="{{ url_for('web_bp.list_article',uuid=g.col_first.uuid) }}?page={{ g.page.pages }}" title="尾页">尾页</a>
            {% endif %}
            {% if g.page.has_next %}
                <a href="{{ url_for('web_bp.list_article',uuid=g.col_first.uuid) }}?page={{ g.page.next_num }}"
                   title="下一页">下一页</a>
            {% endif %}
        </div>
    {% endif %}
{% endblock %}